/*
 * FlexWire.h
 *
 */

#ifndef FLEXWIRE_H_
#define FLEXWIRE_H_

#include "Cpu.h"
#include "pin_mux.h"

#define FLEX_Write          0x1
#define FLEX_READ           0x0

#define BYTE_NUM_1          0x0
#define BYTE_NUM_4          0x1
#define BYTE_NUM_16         0x2
#define BYTE_NUM_24         0x3

void FlexWrite(uint16_t dev_addr_x, uint16_t reg_addr, uint16_t *dataBytes, uint16_t length, uint16_t checkResponse);
void FlexWriteBroadcast(uint16_t reg_addr, uint16_t *dataBytes, uint16_t length);
void FlexRead(uint16_t dev_addr_x, uint16_t reg_addr, uint16_t length, uint16_t checkRcvCrc);

#endif /* FLEXWIRE_H_ */
